<?php

use Illuminate\Routing\Router;

Admin::registerAuthRoutes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', function(){
    	return redirect('admin/user');
    });
    $router->resource('/user',UserController::class); //用户
    $router->resource('/todayUsers',TodayUserController::class); //今日新增用户
    $router->get('subUsers/{id}', 'UserController@subUsers');//下级用户

    $router->any('/task/get_task_list', 'TaskController@get_task_list'); //获取任务列表
    $router->resource('/task',TaskController::class); //任务
    $router->get('task_step/{id}', 'TaskController@task_step');//任务步骤

    $router->resource('/taskstep',TaskStepController::class); //任务步骤
    $router->resource('/tasksubmit',TaskSubmitController::class); //任务提交内容
    $router->resource('/tasktype',TaskTypeController::class); //任务类型
    $router->any('/get_type_list', 'TaskTypeController@get_type_list'); //获取任务类型列表

    $router->get('/taskdetail/{id}','TaskAuditController@taskdetail'); //任务详情
    $router->post('/taskaudit/success','TaskAuditController@success'); //任务通过
    $router->post('/taskaudit/failed','TaskAuditController@failed'); //任务不通过
    $router->resource('/taskaudit',TaskAuditController::class); //任务审核
    $router->post('/taskauditpay/taskpay', 'TaskpayController@taskpay'); //任务打款
    $router->resource('/taskauditpay',TaskPayController::class); //任务审核打款

    $router->get('/userinfo/{id}', 'WithdrawController@userinfo'); //提现详情
    $router->post('/withdraw/has_pay', 'WithdrawController@has_pay'); //打款成功
    $router->post('/withdraw/has_failed', 'WithdrawController@has_failed'); //打款失败
    $router->resource('/withdraw',WithdrawController::class); //提现申请
    $router->resource('/withdrawlist',WithdrawlistController::class); //提现记录

    $router->any('/get_money_log_type', 'MoneyLogTypeController@get_money_log_type'); //获取变动类型列表
    $router->resource('/moneylog',MoneyLogController::class); //余额变动记录
    $router->resource('/moneylogtype',MoneyLogTypeController::class); //余额变动类型



    $router->resource('/partner',PartnerController::class); //加盟合作


    $router->get('test','UserController@test');
    



    $router->resource('/freeuser',FreeUserController::class); 



});
